package com.dcsh.market;

// Generated 2009-3-2 20:48:10 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Chuku generated by hbm2java
 */
@Entity
@Table(name = "Chuku", schema = "dbo", catalog = "test")
public class Chuku implements java.io.Serializable {

	private int id;
	private Canku cankuByCankuId;
	private Canku cankuByRkId;
	private Users users;
	private Custom custom;
	private String bno;
	private Date cksj;
	private String memo;
	
	private Set<Chukumx> chukumxes = new HashSet<Chukumx>(0);

	public Chuku() {
	}

	public Chuku(int id, Canku cankuByCankuId, Users users, Custom custom,
			String bno, Date cksj) {
		this.id = id;
		this.cankuByCankuId = cankuByCankuId;
		this.users = users;
		this.custom = custom;
		this.bno = bno;
		this.cksj = cksj;
	}

	public Chuku(Canku cankuByCankuId, Users users, Custom custom,
			String bno, Date cksj) {
		this.cankuByCankuId = cankuByCankuId;
		this.users = users;
		this.custom = custom;
		this.bno = bno;
		this.cksj = cksj;
	}

	public Chuku(int id, Canku cankuByCankuId, Canku cankuByRkId, Users users,
			Custom custom, String bno, Date cksj, Set<Chukumx> chukumxes) {
		this.id = id;
		this.cankuByCankuId = cankuByCankuId;
		this.cankuByRkId = cankuByRkId;
		this.users = users;
		this.custom = custom;
		this.bno = bno;
		this.cksj = cksj;
		this.chukumxes = chukumxes;
	}

	public Chuku(Canku cankuByCankuId, Canku cankuByRkId, Users users,
			Custom custom, String bno, Date cksj, Set<Chukumx> chukumxes) {

		this.cankuByCankuId = cankuByCankuId;
		this.cankuByRkId = cankuByRkId;
		this.users = users;
		this.custom = custom;
		this.bno = bno;
		this.cksj = cksj;
		this.chukumxes = chukumxes;
	}
	
	public Chuku(Canku cankuByCankuId, Canku cankuByRkId, Users users,
			Custom custom, String bno, Date cksj, Set<Chukumx> chukumxes,String memo) {

		this.cankuByCankuId = cankuByCankuId;
		this.cankuByRkId = cankuByRkId;
		this.users = users;
		this.custom = custom;
		this.bno = bno;
		this.cksj = cksj;
		this.chukumxes = chukumxes;
		this.memo = memo;
	}
	


	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "CankuID", nullable = false)
	public Canku getCankuByCankuId() {
		return this.cankuByCankuId;
	}

	public void setCankuByCankuId(Canku cankuByCankuId) {
		this.cankuByCankuId = cankuByCankuId;
	}

	@ManyToOne
	@JoinColumn(name = "RkID")
	public Canku getCankuByRkId() {
		return this.cankuByRkId;
	}

	public void setCankuByRkId(Canku cankuByRkId) {
		this.cankuByRkId = cankuByRkId;
	}

	@ManyToOne
	@JoinColumn(name = "Ckczy", nullable = false)
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@ManyToOne
	@JoinColumn(name = "CustomID")
	public Custom getCustom() {
		return this.custom;
	}

	public void setCustom(Custom custom) {
		this.custom = custom;
	}

	@Column(name = "BNO", nullable = false, length = 10)
	public String getBno() {
		return this.bno;
	}

	public void setBno(String bno) {
		this.bno = bno;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "Cksj", nullable = false, length = 23)
	public Date getCksj() {
		return this.cksj;
	}

	public void setCksj(Date cksj) {
		this.cksj = cksj;
	}
	
	
	

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "chuku")
	public Set<Chukumx> getChukumxes() {
		return this.chukumxes;
	}

	public void setChukumxes(Set<Chukumx> chukumxes) {
		this.chukumxes = chukumxes;
	}
	
	@Column(name = "memo", length = 100)
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

}
